import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class TraceLinePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        title: Text("物流跟踪线"),
      ),
      body: ListView.builder(
          itemCount: 3,
          itemBuilder: (BuildContext context, int index) {
            return IntrinsicHeight(
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
                  Padding(
                    padding:
                        EdgeInsets.only(top: 10.0, right: 5.0, bottom: 10.0),
                    child: Column(
                      crossAxisAlignment: CrossAxisAlignment.end,
                      children: <Widget>[Text("07:33"), Text("今天")],
                    ),
                  ),
                  Column(
                    children: <Widget>[
                      Expanded(
                        flex: 1,
                        child: VerticalDivider(
                          color: Colors.grey,
                          thickness: 1,
                        ),
                      ),
                      Container(
                        width: index == 2 ? 15 : 10,
                        height: index == 2 ? 15 : 10,
                        decoration: BoxDecoration(
                            shape: BoxShape.circle,
                            color: index == 2 ? Colors.green : Colors.grey),
                      ),
                      Expanded(
                        flex: 1,
                        child: VerticalDivider(
                          color: Colors.grey,
                          thickness: 1,
                        ),
                      )
                    ],
                  ),
                  Padding(
                    padding: EdgeInsets.only(left: 5.0),
                    child: Text("商品准备中"),
                  )
                ],
              ),
            );
          }),
    );
  }
}
